package cn.tedu.spring.di;

/**
 * Author：程Sir
 * Name： SpringTest01
 * Content:
 */
public class Worker {
    private String name = "光头强";

    private Saw saw;

    public void work(){
        System.out.println(name + "使用："+ saw.getName() + "砍树！");
    }

    @Override
    public String toString() {
        return "Worker{" +
                "name='" + name + '\'' +
                ", saw=" + saw +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Saw getSaw() {
        return saw;
    }

    public void setSaw(Saw saw) {
        this.saw = saw;
    }
}
